package com.jd.webapp.service;

import java.io.InputStream;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.jd.common.util.FastdfsUtils;

@Service
public class FileServiceImpl implements FileService {

	@Value("${FILE_SERVER}")
	private String url;
	@Override
	public String upload(String originalFilename, InputStream in)
			throws Exception {
		
		String id = FastdfsUtils.uploadFile(in , originalFilename);
		return url+id;
	}

}
